﻿//*********************************************************************
//
//  文件名：ContractModel
//
//  作者： Pwp
//
//  作用：
//
//  日期：2015/9/20
//
//*********************************************************************
using EntityFramework.Entity.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YouTravel.Framework.Enums;

namespace YouTravel.DomainModels
{
    /// <summary>
    /// 专线合同列表
    /// </summary>
	public class ContractListViewModel
    {
		/// <summary>
		/// 合同ID
		/// </summary>
		public int ID { get; set; }
        /// <summary>
        /// 合同名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 合同编号
        /// YTHT+当前日期+3位随机数
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 合同状态
        /// 1-正常 2-变更 3-续约 4-关闭 5-废弃
        /// </summary>
        public int Status { get; set; }
		/// <summary>
		/// 专线
		/// </summary>
		public virtual Special Special { get; set; }
		/// <summary>
		/// 供应商、销售商
		/// </summary>
		public virtual SellerSupplier SellerSupplier { get; set; }
        /// <summary>
        /// 合同起始时间
        /// </summary>
        public DateTime? StartDate { get; set; }
        /// <summary>
        /// 合同到期时间
        /// </summary>
        public DateTime EndDate { get; set; }
        /// <summary>
        /// 附件集合
        /// </summary>
        public virtual ICollection<Attachment> Attachments { get; set; }
        /// <summary>
        /// 创建人Id
        /// </summary>
        public int CreaterId { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        /// <summary>
        /// 更新人Id
        /// </summary>
        public int UpdaterId { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdateTime { get; set; }
    }

	/// <summary>
	/// 合同创建集合
	/// </summary>
	public class ContractViewModel
	{
		/// <summary>
		/// 合同ID
		/// </summary>
		public int ID { get; set; }
		/// <summary>
		/// 名称
		/// </summary>
		public string Name { get; set; }
		/// <summary>
		/// 银行
		/// </summary>
		public string Bank { get; set; }
		/// <summary>
		/// 银行帐号
		/// </summary>
		public string ChargeBankNumber { get; set; }
		/// <summary>
		/// 负责人
		/// </summary>
		public string ChargeName { get; set; }
		/// <summary>
		/// 手机
		/// </summary>
		public string Phone { get; set; }
		/// <summary>
		/// 身份证
		/// </summary>
		public string CertificateNum { get; set; }
		/// <summary>
		/// 合同名称
		/// </summary>
		public string ContractName { get; set; }
		/// <summary>
		/// 合同起始时间
		/// </summary>
		public string StartDate { get; set; }
		/// <summary>
		/// 合同到期时间
		/// </summary>
		public string EndDate { get; set; }

		/// <summary>
		/// 专线ID
		/// </summary>
		public int SpecialId { get; set; }
		/// <summary>
		/// 合同类型
		/// </summary>
		public int Type { get; set; }
		/// <summary>
		/// 附件集合
		/// </summary>
		public List<ContractAttachment> Attachments { get; set; }
		/// <summary>
		/// 操作人ID
		/// </summary>
		public int OperatorID { get; set; }
		/// <summary>
		/// 操作人名称
		/// </summary>
		public string OperatorName { get; set; }
		/// <summary>
		/// 操作日期
		/// </summary>
		public DateTime OptionTime { get; set; }
	}

	public class ContractAttachment {
		/// <summary>
		/// 文件名称
		/// </summary>
		public string Item1 { get; set; }
		/// <summary>
		/// 文件相对地址
		/// </summary>
		public string Item2 { get; set; }
	}
}
